package com.demo.project_template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户帖子
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-08-20 11:48:57
 */
@Getter
@Setter
@TableName("t_post")
@ApiModel(value = "Post对象", description = "用户帖子")
public class Post implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId("id")
    private Integer id;

    @ApiModelProperty("发帖人id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("标题")
    @TableField("title")
    private String title;

    @ApiModelProperty("图片json集合")
    @TableField("picture_json")
    private String pictureJson;

    @ApiModelProperty("点赞量")
    @TableField("like_count")
    private Long likeCount;

    @ApiModelProperty("评论量")
    @TableField("comment_count")
    private Long commentCount;

    @ApiModelProperty("浏览量")
    @TableField("view_count")
    private Long viewCount;

    @ApiModelProperty("状态（0=待审核，1=审核通过，2=审核不通过）")
    @TableField("state")
    private String state;

    @ApiModelProperty("是否删除")
    @TableField("is_delete")
    @TableLogic
    private String isDelete;

    @ApiModelProperty("创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("修改时间")
      @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private Integer isLike;
}
